<!--#include file="Config.asp" -->
<!--#include file="HeadTop.asp"-->
<%
If Request.Form <> "" Then
	WorkExpId =Trim(Request.Form("WorkExpId"))
	WorkExpBeginDate =Trim(Request.Form("WorkExpBeginDate"))
	WorkExpEndDate =Trim(Request.Form("WorkExpEndDate"))
	WorkExpCompanyName =Trim(Request.Form("WorkExpCompanyName"))
	WorkExpCompanyNature =int(Request.Form("WorkExpCompanyNature"))
	WorkExpCompanyIndustry =Trim(Request.Form("WorkExpCompanyIndustry"))
	WorkExpPost =Trim(Request.Form("WorkExpPost"))
	WorkExpJobs =Trim(Request.Form("WorkExpJobs"))
	WorkExpNote =Trim(Request.Form("WorkExpNote"))
	WorkExpLeave =Trim(Request.Form("WorkExpLeave"))

	If WorkExpId = "" Or IsNull(WorkExpId) Or Not IsNumeric(WorkExpId) Then WorkExpId = 0

	Conn.Execute("update WorkExpTbl set WorkExpBeginDate = '"& WorkExpBeginDate &"' , WorkExpEndDate = '"& WorkExpEndDate &"' , WorkExpCompanyName = '"& WorkExpCompanyName &"' , WorkExpCompanyNature = '"& WorkExpCompanyNature &"' , WorkExpCompanyIndustry = '"& WorkExpCompanyIndustry &"' , WorkExpPost = '"& WorkExpPost &"' , WorkExpJobs = '"& WorkExpJobs &"' , WorkExpNote = '"& WorkExpNote &"' , WorkExpLeave = '"& WorkExpLeave &"' where WorkExpId = "& WorkExpId &" and PerId = "& session("AnyPIM_userID")&" ")

'response.redirect "ChgPerInfo_5.asp"
End If

WorkExpId =int(Request("WorkExpId"))

Rs.Open "select * from WorkExpTbl where WorkExpId = "& WorkExpId &" and PerId = "& session("AnyPIM_userID") , Conn , 1 , 1
If Rs.Eof Then
	WorkExpBeginDate = ""
	WorkExpEndDate = ""
	WorkExpCompanyName = ""
	WorkExpCompanyNature = ""
	WorkExpCompanyIndustry = ""
	WorkExpPost = ""
	WorkExpJobs = ""
	WorkExpNote = ""
	WorkExpLeave = ""
Else
	WorkExpBeginDate = Rs("WorkExpBeginDate")
	WorkExpEndDate = Rs("WorkExpEndDate")
	WorkExpCompanyName = Rs("WorkExpCompanyName")
	WorkExpCompanyNature =int(Rs("WorkExpCompanyNature")) '公司性质
	WorkExpCompanyIndustry =int(Rs("WorkExpCompanyIndustry")) '公司所在行业
	WorkExpPost = Rs("WorkExpPost")
	WorkExpJobs = Rs("WorkExpJobs")
	WorkExpNote = Rs("WorkExpNote")
	WorkExpLeave = Rs("WorkExpLeave")
End If
Rs.Close
%>

<script language="javascript">
	function CheckForm()
	{
		if(!checkLength("WorkExpBeginDate" , "开始时间" , 1 , 20))
return false;
		if(!checkLength("WorkExpEndDate" , "结束时间" , 0 , 20))
return false;
		if(!checkLength("WorkExpCompanyName" , "公司名称" , 1 , 100))
return false;
		if(PerForm.WorkExpCompanyNature.value == "")
		{
alert("请选择公司性质");
return false;
		}
		if(PerForm.WorkExpCompanyIndustry.value == "")
		{
alert("请选择所属行业");
return false;
		}
		if(!checkLength("WorkExpPost" , "所在部门" , 1 , 50))
return false;
		if(!checkLength("WorkExpJobs" , "职位名称" , 1 , 50))
return false;
		if(!checkLength("WorkExpNote" , "工作描述" , 0 , 1000))
return false;
		if(!checkLength("WorkExpLeave" , "离职原因" , 1 , 100))
return false;
		return true;
	}
</script>
<!-- 工作经历开始 -->
<TABLE class="table table-condensed" >
<tr>
<td>
<a href="Work_Add.asp?FbcID=41"><img src="img/some_Add.png" border="0" alt=""><strong>【添加工作经历】</strong></a>
</td>
</tr>
</table>
<!--  -->
<TABLE class="table table-condensed" >
<form id="PerForm" name="PerForm" method="post" action="Work_Edit.asp" onsubmit="return CheckForm();">
<tr bgcolor="#f6f6f6">
<td width="13%" bgcolor='#ddeeff'>时间：
<input name="WorkExpId" type="hidden" id="WorkExpId" value="<%=WorkExpId%>" /></td>
<td width="87%" >从
	<input name="WorkExpBeginDate" type="text" class="Wdate" onClick="WdatePicker()" value="<%=WorkExpBeginDate%>" size="16" />
	到
	<input name="WorkExpEndDate" type="text" class="Wdate" onClick="WdatePicker()" value="<%=WorkExpEndDate%>" size="16" />
(格式：2007-09，后面一项目不填表示至今)</td>
</tr>
<tr>
<td bgcolor='#ddeeff'>公司名称：</td>
<td ><input name="WorkExpCompanyName" type="text" id="WorkExpCompanyName" value="<%=WorkExpCompanyName%>" size="50" />
<select name="WorkExpCompanyNature" id="WorkExpCompanyNature">
	<%
	Rs.Open "select * from CompanyNatureTbl order by CompanyNatureId asc" , Conn , 1 , 1
	Do While Not Rs.Eof
		Response.Write("<option value="""& Rs("CompanyNatureId") &""" ")
		If int(Rs("CompanyNatureId")) =int(WorkExpCompanyNature) Then Response.Write("selected")
		Response.Write(">"& Rs("CompanyNatureName") &"</option>")
	Rs.MoveNext
	Loop
	Rs.Close
	%>
</select>
<select name="WorkExpCompanyIndustry" id="WorkExpCompanyIndustry">
	<%
	Rs.Open "select * from PositionTbl where PositionKey = 0 order by PositionId asc" , Conn , 1 , 1
	Do While Not Rs.Eof
		Response.Write("<option value="""& int(Rs("PositionId")) &""" ")
		If int(Rs("PositionId")) = int(WorkExpCompanyIndustry) Then Response.Write("selected")
		Response.Write(">"& Rs("PositionName") &"</option>")
	Rs.MoveNext
	Loop
	Rs.Close
	%>
</select>
</td>
</tr>
<tr>
<td bgcolor='#ddeeff'>所在部门：</td>
<td ><input name="WorkExpPost" type="text" id="WorkExpPost" value="<%=WorkExpPost%>" size="30" />
&nbsp;最终职位：<input name="WorkExpJobs" type="text" id="WorkExpJobs" value="<%=WorkExpJobs%>" size="30" /></td>
</tr>
<tr>
<td bgcolor='#ddeeff'>工作描述：</td>
<td ><textarea name="WorkExpNote" cols="70" rows="8" style="display:none"><%=WorkExpNote%></textarea>
<IFRAME ID="eWebEditor1" src="_Editor/ewebeditor.asp?id=WorkExpNote&style=s_exampleremote" frameborder="0" scrolling="no" width="100%" height="350"></IFRAME></td>
</tr>
<tr>
<td bgcolor='#ddeeff'>离职原因：</td>
<td ><input name="WorkExpLeave" type="text" id="WorkExpLeave" value="<%=WorkExpLeave%>" size="50" /></td>
</tr>
<tr>
<td bgcolor='#ddeeff'>&nbsp;</td>
<td ><input type="submit" name="Submit" value=" 修  改 " />
		<input type="reset" name="Submit" value=" 重  置 " />
</td>
</tr>
</form>
</table>

<!-- #include file="foot.asp" -->
